﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <%@ include file="/WEB-INF/include/menu.jsp"%>

  <div class="container main-content">

    <div class="panel panel-default x-panel x-panel-layout">

      <div class="panel-heading">
        <ol class="breadcrumb">
          <li><a href="${ctx.host}/ecommerce">打卡管理</a></li>
          <li class="active">打卡用户</li>
        </ol>
      </div>

      <div class="panel-body">

        <div class="col-xs-2 x-panel-layout-left no-horizontal-padding">
          <%@ include file="/WEB-INF/include/submenu.jsp"%>
        </div>

        <div class="col-xs-10 x-panel-layout-right">

          <div class="x-breadcrumb-wrapper">
            <div class="x-breadcrumb clearfix">
              <h2><i class="glyphicon glyphicon-fire" title=""></i>&nbsp;&nbsp;<span>打卡用户&nbsp;-&nbsp;用户列表</span></h2>
            </div>
          </div>
          
          <table class="table table-striped table-hover x-table" style="margin-bottom:20px;">
            <thead>
              <tr>
                <th>名称</th>
                <th>手机号</th>
                <th>积分</th>
                <th>测试分享</th>
                <th>打卡分享</th>
                <th>是否开启课程</th>
                <th class="text-center">操作</th>
              </tr>
            </thead>
            <tbody>
              <c:forEach var="user" items="${users}">
                <tr>
                  <td>${user.name}</td>
                  <td>${user.mobile}</td>
                  <td>${user.credit}</td>
                  <td>${persist.marketInvitees(user.id)}</td>
                  <td>${persist.marketRecommendedPersons(user.id)}</td>
                  <td>${persist.marketInvitees(user.id) >= 1 ? '是' : '否'}</td>
                  <td>
                    <a href="${ctx.host}/market-users/${user.id}">详情</a>
                  </td>
                </tr>
              </c:forEach>
            </tbody>
          </table>

          <jsp:include page="/WEB-INF/include/page.jsp">
            <jsp:param name="url" value="market-users" />
            <jsp:param name="queryString" value="${queryString}" />
          </jsp:include>

        </div>
      </div>
    </div>
  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>

</body>

</html>
